home *** CD-ROM | disk | FTP | other *** search
/ Space & Astronomy / Space and Astronomy (October 1993).iso / mac / programs / satrack / SS4EXE.ZIP / SEESAT4.DOC < prev    next >
Text File  |  1992-01-05  |  35KB  |  891 lines

  1. SEESAT4.DOC
  2. SEESAT earth satellite tracking program - documentation
  3. Paul Hirose - 1992 Jan 5
  4.  
  5.  
  6. Introduction
  7.  
  8. SEESAT is an earth satellite orbit prediction program for visual
  9. observers.  It computes the information needed to plot a satellite
  10. in a star atlas and observe it with binoculars.
  11.  
  12. SEESAT uses the SGP4 orbit prediction model, which is the primary
  13. NORAD model for near-earth satellites.  (I can provide the SGP and
  14. SGP8 models on request.)  SEESAT is compatible with the NORAD 2-Line
  15. element set format.
  16.  
  17. SEESAT is written in the C language.  For maximum portability, it
  18. assumes only a teleprinter terminal.  Since it is a text-only,
  19. command-driven program, SEESAT can be ported to any system with a C
  20. compiler.  All source code is public domain without restrictions.  You
  21. are welcome to use my code in your own projects, compile and
  22. distribute SEESAT executables, create custom versions of SEESAT, etc. 
  23. I distribute SEESAT as C source code only, relying on others to create
  24. the executables.
  25.  
  26. Primary distribution points for SEESAT are the Celestial BBS in Dayton
  27. (513-427-0674) and the CSS BBS in Toronto (416-458-5907).  Both
  28. systems are open 24 hours.  These are also good places to reach me if
  29. you have questions about SEESAT.
  30.  
  31.  
  32.  
  33. Warnings
  34.  
  35. Users of former SEESAT versions should be aware of some changes.
  36.  
  37. The program no longer prompts for observer's position at startup. 
  38. Height, latitude, longitude, and time zone must be entered via
  39. commands.  The program will NOT warn if you've forgotten to set any of
  40. these values!
  41.  
  42. Observer's height is now measured in KILOMETERS, not feet.
  43.  
  44. Time zone is entered in the same format used to enter time in the rest
  45. of the program, instead of the former decimal hours.  In addition, the
  46. sign has reversed, so negative (west) longitudes now have negative
  47. time zones.
  48.  
  49. These changes should not cause any inconvenience, since SEESAT now
  50. provides for an automatic initialization file.
  51.  
  52.  
  53.  
  54. New Features
  55.  
  56. These are all new with this release:
  57.  
  58. A command to select display of all predictions, not just the ones
  59. above the horizon. 
  60.  
  61. A command to select display of satellite longitude with respect to
  62. your meridian instead of Greenwich.
  63.  
  64. Satellite longitude and latitude are displayed to the nearest .1
  65. degree.
  66.  
  67. The prediction table has a new column for estimated magnitude, which
  68. is computed from absolute magnitude, range, and phase angle.  Absolute
  69. magnitude input is automatic if SEESAT senses a Molczan-format element
  70. set, or it may be entered with a command.
  71.  
  72. Latitude, longitude, height, and time zone are input by commands
  73. instead of by answering questions at startup.  This lets you change
  74. them without exiting the program.
  75.  
  76. A new command, NEXT, loads the next satellite in the elements file.
  77.  
  78. You can tell SEESAT how many characters to use from the name line in
  79. the orbital element file.  This can prevent it from taking Molczan's
  80. size data as part of the satellite name.
  81.  
  82. The + character in element sets has a checksum value of 0, in
  83. accordance with the latest NORAD policy.
  84.  
  85. All orbital elements may be entered manually.  The old SEESAT didn't
  86. provide for satellite name or epoch
  87.  
  88. Automatic adjustment of a prelaunch element set, if you input the
  89. assumed and actual launch times.
  90.  
  91. RUN executes a prediction run.  (Old SEESAT didn't have an explicit
  92. run command.)
  93.  
  94. A prediction run may be specified in terms of START and SPAN, in
  95. addition to the old START/STOP and CENTER/SPAN modes.
  96.  
  97. I have added provision to interrupt a prediction run and return
  98. control to the keyboard.  Routines are included for the Laser C (Atari
  99. ST) and Turbo C (IBM clone) compilers.
  100.  
  101. SEESAT is now bilingual:  CENTER and CENTRE are equivalent commands.
  102.  
  103. Commands REPEAT, PRINT?, and SKIP allow you to create an iterating
  104. command line.
  105.  
  106. A new command, EX <filename>, will execute the specified batch file. 
  107. This causes the command interpreter to get its lines from the file
  108. instead of the keyboard.
  109.  
  110. RET transfers control from batch file to keyboard or vice versa.
  111.  
  112. At startup, SEESAT looks for file SEESAT.BAT.  If present, it will be
  113. executed as a batch file.  You may have this file set SEESAT to your
  114. location and perform any other initialization tasks.
  115.  
  116.  
  117.  
  118. Sample Session
  119.  
  120. This is from an actual SEESAT session.  It may be used as a quick
  121. check for proper functioning of your program.
  122.  
  123. A>seesat4
  124. SEESAT (SGP4) 1992 Jan 4 by Paul Hirose
  125. >lat 34.915 lon -117.933 height .73 zone -800
  126. >open b:noaa9.ele
  127. complete; 1 satellites found
  128. >load "noaa 9"
  129. NOAA 9     
  130. 1 15427U 84123  A 91289.49913910  .00000538  00000-0  30856-3 0  8532
  131. 2 15427  99.1650 305.9266 0016081  84.5452 275.7530 14.13148923352652
  132. >start 1991 oct 27 1750 span 136 step 12
  133. NOAA 9        1991 OCT 27
  134.   time   az el   R.A.    dec    range sun   mag    alt  lat    lon
  135. 1850:00 286 38  17h 7m  31 50'   1265  13 * 1.2    841 36.6N 127.5W
  136. >center 1850 span 18 step 4
  137. NOAA 9        1991 OCT 27
  138.   time   az el   R.A.    dec    range sun   mag    alt  lat    lon
  139. 1842:00 185  2  20h43m -53  0'   3181  12 * 2.6    848  8.7N 120.0W
  140. 1846:00 203 22  19h39m -29  0'   1755  12 * 1.5    845 22.6N 123.5W
  141. 1850:00 286 38  17h 7m  31 50'   1265  13 * 1.2    841 36.6N 127.5W
  142. 1854:00 330 11  13h11m  53 20'   2399  15 * 2.4    839 50.4N 132.9W
  143. >para 1850
  144. parallactic angle = 68
  145. >sun 1850
  146. az=270 el=-23
  147. >moon 1850
  148. az=44 el=-16
  149. 75% illuminated
  150. >exit
  151.  
  152.  
  153.  
  154. Entering Commands
  155.  
  156. SEESAT asks no questions and has no menus.  It is a command-driven
  157. program.  You enter a command at the > prompt and press RETURN. 
  158. SEESAT executes the command, possibly generating output, then returns
  159. to the > prompt.
  160.  
  161. Multiple commands may be entered on one line.  They will be executed
  162. from left to right.  Use one or more spaces to separate items on the
  163. command line.  E.g., to load satellite "Mir" from file 929.ELE, you
  164. could do:
  165.      OPEN 929.ELE
  166.      LOAD MIR
  167. or enter both commands on one line:
  168.      OPEN 929.ELE LOAD MIR
  169.  
  170. Up to 80 characters may be typed on a single line.  Backspacing is
  171. allowed to correct mistakes.  SEESAT does not erase characters from
  172. the screen as you backspace over them, but they ARE erased inside the
  173. program.  SEESAT will only execute the characters up to (but not
  174. including) the cursor.
  175.  
  176. You may use lower or upper case.  SEESAT converts the command line to
  177. all upper case before executing it.  I will use upper case in this
  178. documentation.
  179.  
  180.  
  181.  
  182. Command Arguments
  183.  
  184. In the description of SEESAT commands, you'll see that most commands
  185. must be followed by an "argument", i.e., an item for the command to
  186. act on.  The three most common types of argument are:
  187.      <number>
  188.      <time>
  189.      <date time>
  190. I will now describe the format of these arguments.
  191.  
  192.  
  193. The <number> argument is a just a single number.  The following
  194. examples should all be safe formats to use for <number>:
  195.      .001  13.78299201  35.  35  3.5e1  .256e-3
  196. For example, the LAT command sets your latitude:
  197.      LAT 34.915
  198.  
  199.  
  200. A <time> argument is in terms of minutes.  If more than 2 digits are
  201. present, it is considered hours and minutes.  If a colon is present,
  202. anything on the right of the colon is considered seconds.  Leading
  203. zeros are allowed but not required.  E.g.:
  204.  
  205. 1811:15    = 18h 11m 15s
  206. 1811:15.65 = 18h 11m 15.65s  (decimal seconds are allowed)
  207. 1811       = 18h 11m  0s     (seconds are optional)
  208. 0300       =  3h  0m  0s
  209. 300        =  3h  0m  0s     (leading zeros are optional)
  210. 59:50      =  0h 59m 50s
  211. 30         =  0h 30m  0s
  212. 5          =  0h  5m  0s
  213. :10        =  0h  0m 10s
  214. :01        =  0h  0m  1s
  215. :1         =  0h  0m  1s     (leading zeros are optional)
  216. :00.1      =  0h  0m  .1s
  217. :.1        =  0h  0m  .1s    (leading zeros are optional)
  218. 0          =  0h  0m  0s
  219.  
  220. The fields in a <time> are allowed to exceed "normal" bounds.  Any
  221. number up to 99 is legal for hours, minutes, or seconds.  In addition,
  222. seconds may have as many decimal places as desired.  E.g., 460 (4h
  223. 60m) is a legal <time>.  It is identical to 500.  A more extreme
  224. example is 9999:99, which is 99h 99m 99s.
  225.  
  226. The STEP command is an example of a command which requires a <time>
  227. argument.  For example,
  228.      STEP 12
  229. sets the prediction run time step to 12 minutes.
  230.  
  231.  
  232. Other SEESAT commands require a <date time> argument, which is
  233. composed of year, month, day, and time.  All digits of the year must
  234. be given.  Use the first 3 letters of the month name.  The time part
  235. of <date time> follows the same format as the <time> argument
  236. described earlier.
  237.  
  238. The MOON command is an example of a command which takes a <date time>
  239. argument.  E.g.,
  240.      MOON 1991 DEC 28 1730
  241. will cause SEESAT to display the moon's azimuth and elevation at the
  242. given time.
  243.  
  244. The day part of a <date time> may be ANY integer.  E.g.,
  245.      MOON 1991 JAN 0 1200
  246.      MOON 1990 DEC 31 1200
  247. will give identical results, as will these commands:
  248.      MOON 1991 JAN 33 1200
  249.      MOON 1991 FEB 2 1200
  250.  
  251. You may omit year, year/month, or year/month/day, e.g.,
  252.      MOON 1991 JUN 12 1800
  253.      MOON JUN 12 1800
  254.      MOON 12 1800
  255.      MOON 1800
  256. are all legal commands.  The omitted part of the date will default
  257. to the last value(s) you entered in a <date time>.  All commands share
  258. the same default date.  For example, if you enter the commands
  259.      MOON JUN 11 2200
  260.      SUN 12 2200
  261.      MOON 2200
  262. you will get the moon's position on June 11 at 2200, the sun's
  263. position on June 12 at 2200, and the moon's position on June 12 at
  264. 2200.  Since the year has not been specified, in all three cases it
  265. will default to the last year you entered.
  266.  
  267. Note that you may omit the entire date from <date time>, but you
  268. must always include the time!
  269.  
  270. There is no default date at program startup, so your first <date time>
  271. must include the complete date.  Remember to use the full year, not
  272. just the last two digits.
  273.  
  274.  
  275.  
  276. Setup Commands
  277.  
  278. LAT <number>          [degrees; negative if south]
  279. LON <number>          [degrees; negative if west]
  280. HEIGHT <number>       [kilometers; negative if below sea level]
  281.      These commands set SEESAT to your location.
  282.      At 1000 km (a typical viewing distance), a 10 mile error in your
  283. position (16 km or .14 deg) causes a 1 deg error in the satellite
  284. position predicted by SEESAT.  That is for worst-case geometry, i.e.,
  285. the error is at right angles to your line of sight.  Therefore, it is
  286. safe to omit the HEIGHT command if you're unsure of the correct value. 
  287. (The default value at program startup is zero.)  There will be an
  288. appreciable error only if you're at an unusually high altitude.  Note
  289. that height is KILOMETERS, not meters!
  290.  
  291.  
  292. ZONE <time>
  293.      <time> argument equals (local time) - UTC.  A negative sign is
  294. permitted.  E.g., for Pacific Standard Time:
  295.      ZONE -800  or
  296.      ZONE -0800
  297. The ZONE value need not be an integral number of hours, e.g.,
  298. Newfoundland standard time is 3h 30m behind UTC:
  299.      ZONE -330
  300. Default ZONE at program startup is Greenwich time.
  301.  
  302.  
  303. PRECESS <date time>
  304.      Controls the correction of Right Ascension and declination for
  305. precession.  PRECESS sets the final epoch.  The epoch of the elements
  306. is always used as the initial epoch.  For 1950.0 or 2000.0
  307. coordinates, respectively:
  308.      PRECESS 1950 JAN 0 2210
  309.      PRECESS 2000 JAN 1 1200
  310. These are Greenwich times, so, strictly speaking, the PRECESS command
  311. should be given before setting ZONE.  But for all practical purposes
  312. it doesn't matter.  Precession is so slow there will be virtually no
  313. error even if you miss by a full year.  Over several decades, though,
  314. it will build up to a significant level.  For example, if your atlas
  315. is 1950.0 and you neglect the PRECESS command, an error of up to 42
  316. arc minutes can occur in your plot of a satellite's track.  This is
  317. perhaps four or five times worse than SEESAT's prediction accuracy
  318. under good conditions!
  319.      The PRECESS value remains until you change it or exit SEESAT. 
  320. Default setting is 2000.0 at program startup.
  321.  
  322.  
  323. MERIDIAN
  324.      The satellite longitudes in the prediction table may be computed
  325. with respect to either Greenwich or your local meridian.  MERIDIAN
  326. toggles this mode, and informs you of the current mode.  Default is
  327. Greenwich.
  328.  
  329.  
  330. ALL
  331.      Toggles SEESAT between normal mode (predictions below horizon
  332. suppressed) and a mode which displays all predictions.
  333.  
  334.  
  335. Element Set Loading Commands
  336.  
  337.  
  338. OPEN <filename>
  339.      Opens the orbital element file.  If an element file is already
  340. open, that file will be closed first.
  341.      OPEN builds an index of the satellites in the file, using linked
  342. blocks in RAM.  Each block holds 50 satellites.  Storage is requested
  343. as needed at run time, so the size of the element file is limited only
  344. by available memory.  Assuming your system uses 4-byte longs and
  345. 2-byte pointers, each 50-satellite block uses 1352 bytes.
  346.     The index only contains the name of the satellite and its location
  347. in the file.  The elements are not read from the disk until you issue
  348. the LOAD or NEXT command.
  349.  
  350.  
  351. INDEX
  352.      Lists the satellites in the currently open file.  If there is
  353. more than one screenful, it will pause with a "more>" prompt.  At this
  354. prompt you may either press RETURN to continue the listing, or enter a
  355. command (or commands) just as you would at the normal command prompt. 
  356. In that case, the listing is aborted and your commands are executed.
  357.  
  358.  
  359. LOAD <name>
  360.      Loads the named satellite from the file you opened with the OPEN
  361. command.  If the name has spaces, enclose the name in quotes.  A
  362. closing quote is not required if the name is the last item on the
  363. line, e.g., you can do
  364.      LOAD "COSMOS 1383"  or
  365.      LOAD "COSMOS 1383
  366. If the elements fail checksum, you'll get a warning but SEESAT will
  367. let you use the elements.
  368.  
  369.  
  370.  
  371. Setting Run Parameters
  372.  
  373.  
  374. START <date time>
  375. STOP <date time>
  376. SPAN <time>
  377. CENTER <date time>
  378. CENTRE <date time>
  379.      Set the parameters of the prediction run.  CENTRE is identical to
  380. CENTER.  Any of these commands begins a prediction run automatically
  381. if it's the last one on the command line.
  382.  
  383.  
  384. STEP <time>
  385.      Controls size of time steps in the prediction run.  A run begins
  386. automatically if STEP is the last command on the line.
  387.  
  388.  
  389.  
  390. There are three modes for setting the time limits of a prediction run:
  391.      1.  a start time and stop time
  392.      2.  a start time and time span
  393.      3.  a center time and time span
  394.  
  395. For example, these command lines generate indentical prediction runs:
  396.      START 1900 STOP 2100 STEP 10
  397.      START 1900 SPAN 200 STEP 10
  398.      CENTER 2000 SPAN 200 STEP 10
  399.  
  400. The order of the commands in the line doesn't matter.  E.g.,
  401.      STEP 10 STOP 2100 START 1900
  402.      START 1900 STOP 2100 STEP 10
  403. have the same effect.
  404.  
  405. You don't have to re-issue a command if its value hasn't changed.  For
  406. example, suppose you enter:
  407.      CENTER 2000 STEP 2 SPAN 8
  408. and decide that the resulting table is satisfactory except that the
  409. span should have been 12 minutes  Enter:
  410.      SPAN 12
  411. and a run will occur with the same CENTER and STEP values as before. 
  412.  
  413. To change modes you must give both commands associated with the new
  414. mode.  For example, you do a run with these commands:
  415.      START 1730 STOP 1900 STEP 10
  416. Then suppose you want a run starting at 1730, of 12-minute span, with
  417. 2-minute time steps.  Enter:
  418.      START 1730 SPAN 12 STEP 2
  419. You did START 1730 for the first run, so why do it again for the
  420. second?  Because you are changing modes.  The first run was in
  421. start/stop mode.  You are changing to start/span for the second run,
  422. so you must give both START and SPAN.  If you had said:
  423.      SPAN 12 STEP 2
  424. the program would have remained in start/stop mode.  (Again, the order
  425. of the commands on the line doesn't matter, as long as the required
  426. commands are present.)
  427.  
  428. In center/span mode, the first prediction is always 1/2 SPAN before
  429. the CENTER time, and of course the remaining predictions are spaced at
  430. the STEP value you specified.  This can cause unexpected results if
  431. SPAN is not an even multiple of STEP.  E.g., for
  432.      CENTER 1800 SPAN 5 STEP 1
  433. the predictions will be for 1757:30, 1758:30, etc.
  434.  
  435. Since decimal seconds are allowed in <time> or <date time>, it is
  436. possible to specify the time parameters of a run as finely as you
  437. desire.  I discuss SEESAT's time reckoning accuracy in the section
  438. describing the prediction table.
  439.  
  440.  
  441. Some Additional Orbital Element Commands
  442.  
  443.  
  444. NEXT
  445.      Load the next satellite in the file, i.e., the one following the
  446. satellite currently loaded.  If you haven't yet loaded a satellite
  447. from the open file, NEXT will load the first one.  The file must be
  448. opened with the OPEN command before NEXT can access it.
  449.  
  450.  
  451. LENGTH <integer>
  452.      Sets maximum number of characters the OPEN command will consider
  453. significant in the satellite name when building the index.  The LENGTH
  454. command must therefore be issued before OPEN, to have any effect.  Any
  455. number from 1 - 22 is allowed.  Default is 22, and may be left alone
  456. unless you're using a file such as Molczan's N2L series.  In that
  457. case, you'll want to reduce LENGTH to 15 to prevent SEESAT from using
  458. the extra data as part of the satellite name.  LENGTH is set to 22 if
  459. you enter a number larger than 22.
  460.  
  461.  
  462. AOP <number>
  463. B <number>
  464. E <number>
  465. I <number>
  466. MA <number>
  467. MM <number>
  468. MMDOT <number>
  469. MMDOTDOT <number>
  470. NAME <satellite name>
  471. RAAN <number>
  472.      Allow you to manually enter orbital elements or modify elements
  473. already loaded.  Respectivly:  argument of the perigee, BSTAR,
  474. eccentricity, inclination, mean anomaly, mean motion, mean motion dot,
  475. mean motion dot dot, name, Right Ascension of the ascending node.
  476.      Mean Motion dot and mean motion dot dot are used only by the SGP
  477. model.  The newer SGP4 model is the one I include with the standard
  478. SEESAT package, so normally the MMDOT and MMDOTDOT commands have no
  479. effect.
  480.  
  481.  
  482. EPOCH <epoch>
  483.      Manually enter epoch of the orbital elements.  Must be in NORAD
  484. format:  YYDDD.DDD... (use any number of decimal places).  Unused
  485. digits in the integer part of day number must be padded with spaces or
  486. zeros.  If spaces are used for padding, the number must be enclosed in
  487. quotes.  E.g.,
  488.      EPOCH 91003.52029891    or
  489.      EPOCH "91  3.52029891"
  490.  
  491.  
  492. NOMINAL <date time>
  493. ACTUAL <date time>
  494.      These commands adjust the epoch and RAAN of the currently
  495. loaded elements for the difference between the nominal and actual
  496. launch times.  They are useful for correcting a prelaunch element
  497. set.  E.g.,
  498.      NOMINAL 19 1851 ACTUAL 1918
  499. tells SEESAT that the currently loaded elements assume a launch on the
  500. 19th at 1851, but the launch actually occurred at 1918.
  501.      You can't use NOMINAL or ACTUAL by itself!  If you use one, you
  502. must also use the other or you'll get crazy results.  The order of the
  503. commands does not matter, and they don't have to be on the same line. 
  504. Just be sure that both commands have been given before starting a
  505. prediction run.
  506.      The entered values are remembered.  So you may, for example,
  507. use NOMINAL just once, then experiment with different ACTUAL values.
  508.      Loading an element set (even reloading the same one) disables the
  509. effect of NOMINAL and ACTUAL.  Their values are still remembered,
  510. however, so you may re-enable the adjustment by giving one or both
  511. commands. 
  512.      The NOMINAL and ACTUAL arguments may be for any time zone, as
  513. SEESAT cares only about their time difference.
  514.  
  515.  
  516. MAG <number>
  517.      For entering the absolute magnitude of a satellite.  It will be
  518. adjusted for range and illumination angle to generate the "mag" value
  519. in the prediction table.  Absolute magnitude is its magnitude at 1000
  520. km and 50% illuminated (i.e., 90 degree phase angle).
  521.      Absolute magnitude input can be automatic during loading of the
  522. elements from the file.  If the first line of the element set (the
  523. satellite name line) is longer than 32 characters, SEESAT assumes it's
  524. a Molczan format line, and reads the magnitude.  You can use the MAG
  525. command to override the value if necessary.
  526.  
  527.  
  528. MAGBIAS <number>
  529.      Bias to be applied to SEESAT's computed magnitude before display. 
  530. A negative sign is allowed.  The default is zero.
  531.      If your absolute magnitudes assume a different range and/or
  532. illumination than 1000 km and 50%, the MAGBIAS command will bring your
  533. scale into coincidence with SEESAT's.  If r and k are your assumed
  534. standard conditions (in km and percent, respectively), set MAGBIAS to:
  535.      2.5 * log10 ((1000/r)^2 * k/50)
  536. For example, if your absolute magnitude is for 1000 km range and 100%
  537. illuminated, enter:
  538.      MAGBIAS .8
  539.  
  540.  
  541. OFFSET <time>
  542.      Applies an offset to the epoch of the satellite elements, thereby
  543. making the satellite come early or late in the predictions.  Useful
  544. for putting a satellite ahead of or behind schedule, to evaluate the
  545. resulting track drift with respect to the stars.  Also can be
  546. used to adjust for any discrepancy noted between predicted and actual
  547. times of passes.  A negative sign is allowed on <time>.  A negative
  548. <time> will make the effective epoch EARLIER, and make the satellite
  549. come EARLIER in your predictions.
  550.      If OFFSET is nonzero, an advisory of its value is printed at the
  551. top of each prediction table.
  552.      OFFSET is reset to zero when an element set is loaded.
  553.  
  554.  
  555.  
  556. Flow Control Commands
  557.  
  558. The next three commands only work within the same command line.
  559.  
  560.  
  561. PRINT?
  562.      If the last prediction run resulted in a line of data being
  563. printed, execute the command to the right of PRINT?.  Otherwise,
  564. skip it.  There must be at least one command after PRINT?.
  565.  
  566.  
  567. REPEAT
  568.      Jump back to beginning of command line.
  569.  
  570.  
  571. SKIP
  572.      Skip the command to the immediate right of SKIP.  To be used
  573. following PRINT?, to reverse the test.  There must be at least one
  574. command after SKIP.
  575.  
  576.  
  577.  
  578. Other Commands
  579.  
  580.  
  581. SUN <date time>
  582. MOON <date time>
  583.      Print the azimuth & elevation of the body at the given time.  For
  584. the moon, percentage of illumination is also given.
  585.  
  586.  
  587. PARA <date time>
  588.      Print the parallactic angle at the predicted position of the
  589. satellite for the given time.  Parallactic angle is the direction of
  590. celestial north, as seen in a binocular field of view.  E.g., 0 =
  591. straight up, 90 = 3 o'clock.  This command allows you to examine your
  592. star atlas plot and visualize the star field orientation you'll see
  593. when you go outside.
  594.  
  595.  
  596. RUN
  597.      Begin a prediction run, using the current time parameters.  The
  598. START, STOP, CENTER, SPAN, or STEP command automatically begins a
  599. run if it is at the end of the command line.  That is the normal way
  600. to get a run.  The RUN command is convenient if, for example, you load
  601. a new element set and want a run without changing time parameters.
  602.  
  603.  
  604. EX <filename>
  605.      Execute a batch file of commands.  Any SEESAT command may appear
  606. in a batch file.  Multiple commands per line are allowed, just as if
  607. you were entering the command line manually.  EX itself may be in a
  608. batch file.  If encountered, it will close the current batch file and
  609. begin executing the specified file.  Control will not return to the
  610. preceding file.  I.e., you can chain batch files but not nest them.
  611.  
  612.  
  613. RET
  614.      If encountered in a batch file, returns control to user.  If
  615. entered manually, resumes execution of the batch file.
  616.  
  617.  
  618. HELP
  619.      Displays a help screen.
  620.  
  621.  
  622. EXIT
  623.      Exit from SEESAT.
  624.  
  625.  
  626. I have two final points to explain about the command interpreter. 
  627. First, it is legal to give the same command more than once in a line. 
  628. If you have entered a long command line, it is sometimes easier to
  629. repeat a command than to backspace to correct an incorrect argument.
  630.  
  631. Second, your copy of SEESAT may have the ability to abort a prediction
  632. run or execution of a batch file.  I say "may" because there is no
  633. portable way to implement this feature.  There is provision to install
  634. it in the program, and I've supplied routines for Turbo C (for IBM
  635. clones) and Laser C (for the Atari ST).  If your SEESAT was created
  636. with either of these compilers, you can press any key during a
  637. prediction run, execution of a command line (even an iterating one),
  638. or execution of a batch file, and get the > prompt back.
  639.  
  640.  
  641. Prediction Table
  642.  
  643. A table of predicted satellite positions is the main output of SEESAT:
  644.  
  645. NOAA 9        1991 OCT 27
  646.   time   az el   R.A.    dec    range sun   mag    alt  lat    lon
  647. 1845:00 196 15  19h59m -37 20'   2081  12 * 1.8    846 19.1N 122.6W
  648. 1846:00 203 22  19h39m -29  0'   1755  12 * 1.5    845 22.6N 123.5W
  649. 1847:00 215 29  19h14m -17 50'   1476  12 * 1.2    844 26.1N 124.4W
  650.  
  651.  
  652. Time is the time of the prediction.  The table value is rounded to the
  653. nearest second but, internally, time is maintained to full precision. 
  654. For an IEEE double precision value (53-bit significand), this is about
  655. 30 microsecond precision in the context of SEESAT.  Therefore, it's
  656. practical to use split-second time steps in the table if you can keep
  657. track of what entry goes with what time.
  658.  
  659. To reduce cumulative error, the time variable that is incremented
  660. during prediction runs is based on the epoch of the element set, not
  661. on 4713 BC as is the rest of SEESAT's time reckoning.  This variable
  662. would typically have a (IEEE double) precision of .2 or .3 nanosec.
  663.  
  664. Azimuth and elevation are rounded to the nearest degree.  There is no
  665. adjustment of elevation for refraction.
  666.  
  667. Right Ascension is rounded to the nearest minute, declination to the
  668. nearest multiple of 10 minutes.  Both are adjusted for precession.
  669.  
  670. Range is the straight-line distance in kilometers.  It is truncated to
  671. an integer.  (Truncation drops the fractional part, thereby creating
  672. an error of up to 1 in the last place.  On the other hand, rounding
  673. guarantees an error of 1/2 the rounding precision or less.)
  674.  
  675. "Sun" is the elevation of the sun above the satellite's geometrical
  676. horizon (i.e., the horizon adjusted for dip due to satellite height
  677. but not for refraction), rounded to the nearest degree.  A positive
  678. number indicates that the satellite is in sunlight.  Since the horizon
  679. dip in low earth orbit may be 30 degrees or more, the "sun" value can
  680. considerably exceed 90 degrees.
  681.  
  682. The magnitude is an estimate based on the satellite absolute
  683. magnitude, the phase (illumination) angle, and range.  If SEESAT
  684. senses a Molczan-format element file, it automatically extracts the
  685. absolute magnitude.  Otherwise, you may enter it via the MAG command. 
  686. If no absolute magnitude has been input, the displayed magnitude is
  687. prefixed with a *, indicating that this is a "relative magnitude" with
  688. respect to the standard conditions of 1000 km range and 90 degrees
  689. phase angle.  E.g., "* -.6" means that the satellite will be about .6
  690. mag brighter than it would be at 1000 km and 90 degrees phase angle. 
  691. You can change the range and phase angle corresponding to relative
  692. magnitude 0.  Use the MAGBIAS command and the formula in its
  693. description.  But note that the MAGBIAS value will still be in effect
  694. if you enter an absolute magnitude.
  695.  
  696. Altitude is in km, truncated to an integer.  It assumes a spherical
  697. earth 6371 km in diameter.
  698.  
  699. Latitude and longitude are rounded to the nearest .1 degree.  Latitude
  700. is the geocentric latitude.  Longitude may be made to read with
  701. respect to Greenwich or your local meridian, toggled with the
  702. MERIDIAN command.
  703.  
  704.  
  705. 8.  Batch Files
  706.  
  707. A batch file is an ASCII file containing commands for SEESAT.  Lines
  708. may be up to 80 characters long.  Any command which is legal to enter
  709. at the > prompt may be placed in a batch file.  The file may be any
  710. length.  A batch file is executed by typing EX <filename>.
  711.  
  712. If SEESAT finds EX in a batch file, any remaining commands on the
  713. line are executed normally, the current batch file is closed, the new
  714. one is opened, and it begins execution.  Control will NOT return to
  715. the old batch file.
  716.  
  717. At startup, SEESAT looks for file SEESAT.BAT.  If present, it is
  718. executed automatically as a normal batch file.  For example, my
  719. SEESAT.BAT contains:
  720.  
  721. height .73 lat 34.915 lon -117.933 zone -800
  722. start 1992 jan 1 0 length 15
  723. meridian
  724.  
  725. This begins by setting my location and time zone.  Then the START
  726. command establishes a default year and month.  (Any command that
  727. requires a <date time> argument would do the same.)  The day and time
  728. (1st of month at midnight) are dummy values; I only have them there
  729. because it's illegal to omit them.  They could be any value.  To
  730. prevent START from triggering a prediction run, I follow it with a
  731. command to set the max name length to 15.  Finally, I prefer to have
  732. satellite longitudes with respect to my local meridian, so "meridian"
  733. toggles SEESAT to the correct mode.
  734.  
  735.  
  736. This version of SEESAT introduces the PRINT?, REPEAT, and SKIP
  737. commands for controlled iteration.  For example, the following
  738. commands will step through a file, returning control to you if 1) a
  739. prediction above the horizon occurs, or 2) end of element file is
  740. reached.
  741.  
  742.      START 1991 OCT 20 1900 SPAN 200 STEP 8 OPEN 897.ELE
  743.      NEXT RUN PRINT? SKIP REPEAT
  744.  
  745. The first line sets up our prediction run parameters.  Since any of
  746. the parameter-setting commands will trigger a run if it is at the end
  747. of the line, I place the OPEN command there.  The second line does the
  748. iterating.  It uses NEXT to load the next element set, performs a
  749. prediction run, then executes PRINT?.  PRINT? checks if a line of data
  750. has been printed.  If true, the next command executes.  If false,
  751. execution jumps over the next command.
  752.  
  753. Iterating command lines may also be placed in batch files.  For
  754. example, you could check a file for visible satellites with the
  755. following batch file:
  756.      NEXT START 1900 SPAN 200 STEP 8 RUN PRINT? RETURN REPEAT
  757. Suppose that line is a batch file named A. You'd invoke it as follows:
  758.      START 1991 OCT 20 0 OPEN 897.ELE EX A
  759. The START command on this line is just to set up the default date. 
  760. That allows you to omit date from the batch file so you can use the
  761. same one day after day.  The batch file will keep loading and running
  762. predictions until something comes over the horizon.  It then does a
  763. RETURN, at which point you can manually explore the pass in more
  764. detail.  To resume checking the file just type EX A.  (You can't
  765. use RET, since the single line in the batch file has already been
  766. executed.)
  767.  
  768.  
  769. A batch file can also check a specific list of satellites.  For
  770. example,
  771.      LOAD "NADEZHDA 1"
  772.      START 1900 STOP 2100 STEP 10 RUN PRINT? RETURN
  773.      LOAD "NADEZHDA 2"
  774.      START 1900 STOP 2100 STEP 10 RUN PRINT? RETURN
  775.      LOAD "NADEZHDA 3"
  776.      START 1900 STOP 2100 STEP 10 RUN PRINT? RETURN
  777. will, with proper lead-in commands, check the evening for passes of
  778. these satellites.  In this case, you'd use RET to go back to the
  779. batch file after exploring each visible pass.
  780.  
  781.  
  782.  
  783. Element File Format
  784.  
  785. Each orbital element set comprises three lines in the following format.  (The
  786. fourth line here is a ruler to help you count characters and is not present
  787. in an actual element set.)  A file may contain any number of these element
  788. sets.  Blank lines are allowed, but any other extraneous lines (titles,
  789. comments, etc.) are NOT PERMITTED!
  790.  
  791. CCCCCCCCCCCCCCCCCCCCCC         -N.N
  792. 1                 NNNNN.NNNNNNNN -.NNNNNNNN          -NNNNN-N       N
  793. 2       NNN.NNNN NNN.NNNN NNNNNNN NNN.NNNN NNN.NNNN NN.NNNNNNNN     N
  794. 123456789 123456789 123456789 123456789 123456789 123456789 123456789
  795.  
  796. C can be any character
  797. N is any digit.
  798. - represents either a hyphen or a space.
  799.  
  800. The first line is the name of the satellite.  The line may any length,
  801. but only the first 22 characters are recognized as the name.  (22 is
  802. the default; it may be changed to anything from 1 to 22 via the LENGTH
  803. command.)  Trailing spaces are removed from the name and it is
  804. converted to upper case before it is placed in the index.
  805.  
  806. During loading of an element set, SEESAT checks the length of the name
  807. line.  If it is longer than 31 characters, it is assumed to be a
  808. Molczan-format name line, and the field beginning at character 31 must
  809. contain the satellite absolute magnitude.  See the diagram above.
  810.  
  811. The second and third lines are the standard Two-Line Orbital Element Set
  812. Format used by NASA and NORAD.  The format description is:
  813.  
  814. Line 2
  815. Column        Description
  816.  
  817. 1        Must be digit 1
  818. 19 - 20        Epoch Year (Last two digits of year)
  819. 21 - 32        Epoch (Julian Day and fractional portion of the day)
  820. 34 - 43        First Time Derivative of the Mean Motion
  821. 54 - 59        BSTAR drag term (decimal point assumed before 54)
  822. 60 - 61        power of 10 to multiply BSTAR by
  823. 69        Check Sum (Modulo 10)
  824.  
  825. Line 3
  826.  
  827. 1        Must be digit 2
  828. 9 - 16        Inclination [Degrees]
  829. 18 - 25        Right Ascension of the Ascending Node [Degrees]
  830. 27 - 33        Eccentricity (decimal point assumed before 27)
  831. 35 - 42        Argument of Perigee [Degrees]
  832. 44 - 51        Mean Anomaly [Degrees]
  833. 53 - 63        Mean Motion [Revs per day]
  834. 69        Check Sum (Modulo 10)
  835.  
  836.     The NORAD 2-Line element sets contain other fields, but the
  837. above are the only ones used by SEESAT.  First derivative of mean
  838. motion is not used if BSTAR is present.   Except for BSTAR, leading
  839. and trailing zeros are not required.
  840.  
  841.  
  842.  
  843. Compiling SEESAT
  844.  
  845. The source code is in seven files:
  846. SEESAT.H
  847. SEESAT.C (only 2 lines)
  848. DRIVER.C
  849. UTIL.C
  850. SGP4.C
  851. ASTRO.C
  852. READEL.C
  853.  
  854. Check the "Misc Dependencies" section in SEESAT.H.  You may have to
  855. make changes.  Every C file has a #include for SEESAT.H; you may have
  856. change my driver specifier so your compiler will find SEESAT.H.
  857.  
  858.  
  859.  
  860. References
  861.  
  862. Robert M. L. Baker, Jr. and Maud W. Makemson, "An Introduction to
  863. Astrodynamics", Academic Press Inc., New York, 1960
  864.  
  865. W. Gellert, H. Kustner, M. Hellwich, H. Kastner, "The VNR Concise
  866. Encyclopedia of Mathematics", Van Nostrand Reinhold Co., 1975
  867.  
  868. Robin M. Green, "Spherical Astronomy", Cambridge University Press, 1985
  869.  
  870. Jean Meeus, "Astronomical Formulae for Calculators", 3rd ed.,
  871. Willmann-Bell Inc, Richmond, Va., 1985
  872.  
  873. "American Practical Navigator", Vol. I & II, Defense Mapping Agency
  874. Hydrographic/Topographic Center, Washington, D.C., 1984, 1981 respectively
  875.  
  876. Felix R. Hoots and Ronald L. Roehrich, "Spacetrack Report No. 3", Office of
  877. Astrodynamics, Peterson AFB, 1980
  878.  
  879. U.S. Naval Observatory, "Nautical Almanac 1992", Washington, D.C., 1991
  880.  
  881.  
  882. Finally, thanks to the people who contributed suggestions, reference
  883. materials, and testing time to SEESAT:
  884.  
  885. Rocky Harper
  886. TS Kelso
  887. Ted Molczan
  888. Rick Welch
  889. John Williams
  890. Walt Witherspoon
  891. o your compiler will find SEESAT.H.